#ifndef __LOGGER_H
#define __LOGGER_H

#include <pthread.h>

enum
{
    MSG_ALERT	= 1,
    MSG_ERROR	= 10,
    MSG_WARNING	= 20,
    MSG_INFO	= 30,
    MSG_DEBUG	= 40,
    MSG_ALL	= 100
};

class CSysLog
{
protected:
    int m_nLevel;
    bool m_bOpen;
    pthread_mutex_t m_Lock;
public:
    CSysLog(void);
    virtual ~CSysLog(void);

    void Open(int level,char* ident,int facility);
    void Log(int level,char* fmt,...);
    void Close(void);
};

#endif
